//
//  MyOrderCell.m
//  XDBaseFrameWork
//
//  Created by XD-XY on 10/11/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import "MyOrderCell.h"

@implementation MyOrderCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self makeViews];
    }
    return self;
}

-(void)makeViews
{
    self.emplLB = [UILabel initLabelText:@"" andRect:CGRectMake(10, 0.5, 223, 75/2.0f) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:14] andTextColor:UIColorFromRGB(0x999999) andTextAlignment:NSTextAlignmentLeft];
    
    self.statusLB = [UILabel initLabelText:@"" andRect:CGRectMake(0,0.5,UI_SCREEN_WIDTH-35/2.0f,_emplLB.frame.size.height) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:14] andTextColor:UIColorFromRGB(0xa8d842) andTextAlignment:NSTextAlignmentRight];
    
    UIView * line = [UIView initViewRect:CGRectMake(10, height_y(_emplLB), UI_SCREEN_WIDTH-10, 0.5) andBackGroudColor:UIColorFromRGB(0xdddddd)];
    
    self.headIV = [UIImageView initImageViewRect:CGRectMake(10, height_y(line)+13,60, 60) andImage:nil andUserInteractionEnabled:YES];
    _headIV.backgroundColor = UIColorFromRGB(0xfcf2d7);
    
    self.titleLB = [UILabel initLabelText:@"" andRect:CGRectMake(width_x(_headIV)+11, height_y(line), 170, (29+26+26)/2.0f) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:15.5] andTextColor:UIColorFromRGB(0x453d35) andTextAlignment:NSTextAlignmentLeft];
    
    self.pTimeLB = [UILabel  initLabelText:@"" andRect:CGRectMake(_titleLB.frame.origin.x, _headIV.frame.origin.y, 222, 60) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13.5] andTextColor:UIColorFromRGB(0x999999) andTextAlignment:NSTextAlignmentLeft];
    
    self.xTimeLB = [UILabel initLabelText:@"" andRect:CGRectMake(_titleLB.frame.origin.x, height_y(line)+48,222,32) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13.5] andTextColor:UIColorFromRGB(0x999999) andTextAlignment:NSTextAlignmentLeft];
    
    self.priceLB = [UILabel initLabelText:@"" andRect:CGRectMake(0, _titleLB.frame.origin.y, UI_SCREEN_WIDTH-35/2.0f, _titleLB.frame.size.height) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:15.5] andTextColor:UIColorFromRGB(0xffb619) andTextAlignment:NSTextAlignmentRight];
    
    [self.contentView addSubview:_emplLB];
    [self.contentView addSubview:_statusLB];
    [self.contentView addSubview:line];
    [self.contentView addSubview:_headIV];
    [self.contentView addSubview:_titleLB];
    [self.contentView addSubview:_pTimeLB];
    [self.contentView addSubview:_xTimeLB];
    [self.contentView addSubview:_priceLB];
    
    UIView * upline = [UIView initViewRect:CGRectMake(0, 0, UI_SCREEN_WIDTH, 0.5) andBackGroudColor:UIColorFromRGB(0xdcdcdc)];
    UIView * downline = [UIView initViewRect:CGRectMake(0, 131-0.5, UI_SCREEN_WIDTH, 0.5) andBackGroudColor:UIColorFromRGB(0xdcdcdc)];
    [self.contentView addSubview:upline];
    [self.contentView addSubview:downline];
    
    UIView * v = [UIView initViewRect:CGRectMake(0,131, UI_SCREEN_WIDTH, 15) andBackGroudColor:UIColorFromRGB(0xfffefa)];
    [self.contentView addSubview:v];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
